<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="CliViewSACDialogId" widgetVar="CliViewSACDialog" modal="true" resizable="false" appendTo="@(body)" header="SAC" width="50%">
            <h:form id="CliViewSACDialogForm">
                <h:panelGroup>
                    <p:commandButton value="#{bundle.Close}" onclick="TbInstViewDialog.hide()"/>
                    <br /><br />
                    <p:dataTable id="datalistSAC" emptyMessage="Nenhum registro localizado" 
                                 value="#{sacController.items}" 
                                 var="item"
                                 selectionMode="single" 
                                 selection="#{sacController.selected}"
                                 paginator="true"
                                 rowKey="#{item.id}"
                                 rows="10"
                                 paginatorPosition="bottom"
                                 rowsPerPageTemplate="10,20,30,40,50" >

                        <f:facet name="header">
                            <p:outputPanel>                              
                            </p:outputPanel>
                        </f:facet>                        
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="Data"/>
                            </f:facet>
                            <h:outputText value="#{item.dataCadastro}">
                                <f:convertDateTime pattern="dd/MM/yyyy" />
                            </h:outputText>
                        </p:column>                     
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="Motivo Atendimento"/>
                            </f:facet>
                            <h:outputText value="#{item.assunto}"/>
                        </p:column>                     
                        <f:facet name="footer">
                        </f:facet>
                    </p:dataTable>
                    <p:commandButton value="#{bundle.Close}" onclick="TbInstViewDialog.hide()"/>
                </h:panelGroup>
            </h:form>
        </p:dialog>

    </ui:composition>
</html>
